package com.meowcook.service;

import com.meowcook.pojo.dto.LikeCommentDTO;
import com.meowcook.pojo.dto.LikeRecipeDTO;
import com.meowcook.pojo.dto.LikeReplyDTO;
import com.meowcook.pojo.vo.LikeCommentVO;
import com.meowcook.pojo.vo.LikeRecipeVO;
import com.meowcook.pojo.vo.LikeReplyVO;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 28792
 * Date: 2025-05-15
 * Time: 15:39
 */
public interface ILikeService {
    /**
     * 食谱点赞/取消点赞
     * @param likeRecipeDTO 点赞记录
     */
    @Transactional
    void thumbsUpRecipe(LikeRecipeDTO likeRecipeDTO);

    /**
     * 查询食谱点赞记录
     * @param userId 用户id
     * @param recipeId 食谱id
     * @return 点赞记录
     */
    LikeRecipeVO selectLikeRecipeRecord(Long userId, Long recipeId);

    /**
     * 评论点赞/取消点赞
     * @param likeCommentDTO 点赞记录
     */
    @Transactional
    void thumbsUpComment(LikeCommentDTO likeCommentDTO);

    /**
     * 查询食谱点赞记录
     * @param userId 用户id
     * @param commentId 食谱id
     * @return 点赞记录
     */
    LikeCommentVO selectLikeCommentRecord(Long userId, Long commentId);

    /**
     * 查询回复点赞记录
     * @param userId 用户id
     * @param replyId 食谱id
     * @return 点赞记录
     */
    LikeReplyVO selectLikeReplyRecord(Long userId, Long replyId);

    /**
     * 回复点赞/取消点赞
     * @param likeReplyDTO 点赞记录
     */
    @Transactional
    void thumbsUpReply(LikeReplyDTO likeReplyDTO);
}
